#ifndef _SYS_VERSION_H_
#define _SYS_VERSION_H_

#include "FanObj.h"
#include "SysTypes.h"

#define VERSION_VTABLE(self)   ((VersionVTable*)((FanObj*)self)->vtable)


extern Type*    Version_classType;
extern VTable*  Version_classVTable;


/* [sys::Version] Attributes */
struct Version
{
  FanObj        super;
};


/* [sys::Version] Virtual-table */
typedef struct VersionVTable
{
  FanObjVTable  super;
} VersionVTable;


/* [sys::Version] Methods and fields */
Bool            Version_equals(Obj self, NullableObj obj);
Int             Version_compare(Obj self, Obj obj);
Int             Version_hash(Obj self);
Str*            Version_toStr(Obj self);
Version*        Version_defVal(void);
Version*        Version_fromStr_1(Str* version);
Version*        Version_fromStr(Str* version, Bool checked);
Version*        Version_make(List* segments);
List*           Version_segments(Version* self);
Int             Version_major(Version* self);
NullableInt     Version_minor(Version* self);
NullableInt     Version_build(Version* self);
NullableInt     Version_patch(Version* self);


/* [sys::Version] Type-system functions */
Type*           Version_initType(void);
VTable*         Version_initVTable(void);
void            Version_initStatic(void);


#endif
